Package phones :: Module com_brew :: Class _DirCache
[show private | hide private]
[frames | no frames]

Class _DirCache


This is a class that lets you do various filesystem manipulations and it remembers the data. Typical usage would be if you make changes to files (adding, removing, rewriting) and then have to keep checking if files exist, add sizes etc. This class saves the hassle of rereading the directory every single time. Note that it will only see changes you make via this class. If you go directly to the Brew class then those won't be seen.
Method Summary
  __init__(self, target)
  _getdirectory(self, dirname, ensure)
  readfile(self, filename)
  rmfile(self, filename)
  stat(self, filename)
  writefile(self, filename, contents)

Method Details

__init__(self, target)
(Constructor)

Parameters:
target - where operations should be done after recording them here

Generated by Epydoc 2.1 on Fri Aug 15 18:58:30 2008 http://epydoc.sf.net